When processing logs in a sawmill, it is desirable to maximize the volume of the sawn lumber that can be obtained from any one log. It has been found useful to map the shape of raw wood and in particular logs or lumber, and process such information by means of optimizing algorithms so that the wood or the saw may be positioned to maximize the volume of boards cut.
In order to map the surface profile of a log or cant, remote sensors have been employed such as those taught in U.S. Pat. No. 5,056,922 which issued Oct. 15, 1991 to Cielo et al for a Method and Apparatus for Monitoring the Surface Profile of a Moving Work Piece. Cielo et al teaches an apparatus for three-dimensional surface profiling based on triangulation. Triangulation consists of projecting a beam of light to form a luminous spot on the surface to be profiled. It is the location of the luminous spot whose position is to be measured. Viewing the projected spot from an angle relative to the light beam, and determining the position of the reflected spot image allows the instantaneous distance to the surface of the log or cant to be gauged.
Cielo et al discloses a light projecting system which projects more than one discreet co-planar light beam onto the reflecting surface to be profiled, each light beam at a different angle of instance. An optical means such as a lens gathers the light beams reflected from the surface being profiled (hereinafter the "target surface") and images those reflected beams onto a means for detecting each of the light beams such as an array of photo-sensitive pixels. The photo-sensitive pixels, when struck by a light beam, generate an electrical signal. In the array, the location of the pixels generating such signals, relative to the light source, are indicative of distance to the target surface because of the triangulation geometry between the light source and the imaged spot on the array.
Cielo et al teaches using a line array photo-detector aligned relative to an objective lens so that the projection of their axes intersects at a point on the target surface, that is, the object plane, thus satisfying the so-called Scheimpflug condition for focusing a lens. Cielo et al describes this as ensuring that all of the projected light beam spots along the target surface are imaged on the line array detector in sharp focus. The one-dimensional line array detector has detecting elements, that is, pixels, disposed along the detector in a one-dimensional array. The pixels are elongated in a direction perpendicular to the longitudinal axis of the array. Cielo et al teaches using a wide aperture array, that is, an array having significantly elongated pixels (2.5 nm.times.15 .mu.m with 25 .mu.m spacing) in the line array detector so that the light beam spots, preferably having elliptically shaped cross sections, are imaged within the aperture of the array.
Cielo et al also teaches that the signal amplitude generated by a light spot hitting adjacent pixels in the photodetector array, if plotted as signal amplitude versus position along the array, is a pulse having a gaussian distribution. Cielo et al further teaches that the position on the array of each light beam spot image must be located very precisely in order to obtain a good depth accuracy, that is, an accurate distance measurement from the sensor too the target surface whose profile is being mapped. In particular, Cielo et al teaches locating the centre of each pulse using an algorithm for determining what he refers to as the centre of gravity of the pulse. The centroid algorithm is as follows: EQU .mu.avg=[.SIGMA..sub.i .mu..sub.i I(.mu..sub.i)]/[.SIGMA..sub.i I(.mu..sub.i)]
where .mu..sub.i is the position of the i-th element along the array detector and I(.mu..sub.i) is the amplitude of the signal detected by this element, while .SIGMA. is a summation symbol. The centre of gravity computed according to this formula corresponds to the point of maximum signal amplitude of the pulse if the pulse is in fact gaussian, that is, smooth and symmetrical.
Cielo et al recognize however that the shape of such pulses may vary considerably because of speckle and thus a centroid approximation algorithm will not necessarily accurately estimate the position on the array of the maximum signal amplitude of the pulse. Accurately estimating the position of the pulse centroid allows for accurate mapping of the target surface. Cielo et al obtain what they describe as a smooth and constant pulse shape by their combination of a wide aperture array with an elliptically shaped light beam spot imaged as a focussed spot on the array. This allows averaging of the random fluctuations of a number of speckles within each pixel comprising the laser spot image.
The draw back of such a system is that a wide aperture array is required and the alignment of the light beams must be sufficiently accurate to place the imaged light beam spot fully onto the array in order that the stimulated pixels generate sufficient output signal strength to overcome the increased detector background noise associated with wide aperture arrays. Wide aperture arrays are also typically more costly and are slower to scan than conventional one-dimensional arrays having significantly smaller apertures.
Nosler, U.S. Pat. No. 4,248,532 which issued Feb. 3, 1981 for an Electro-optical Distance Measuring System also teaches that it is desirable that the light beam imaged spot on the array be in focus. Nosler discloses a triangulation based electro-optical sensor, similar in underlying principal to that taught by Cielo et al, to measure the position of, and thereby to map, the profile of the surface of logs being moved past the electro-optical distance measuring device. A laser beam is projected onto a log surface and the image of the beam reflection imaged by a lens onto a linear photo-detector array. The location of the image on the array is indicative of the distance to the log surface.
It is disclosed by Nosler that measuring logs requires a dynamic measurement range of between 8 inches and 48 inches and that it is desired to maximize the resolution accuracy of the reflected image so that such accuracy does not vary over the entire dynamic range. Nosler teaches that the angular positioning of the photo-detector array is critical to ensuring that throughout the dynamic range the reflected image on the array will always be in sharp focus. Nosler states that changes in focus of the image on the detector array will cause significant resolution accuracy differences.
In order that the reflected image on the array always be in sharp focus, Nosler teaches intersecting the axis of the light beam (which coincides in the Nosler device with the object plane of the device) with the interception point of the principal axis of the lens and the longitudinal axis of the photo-detector array so that all three axes intersect at one point, referred to by Nosler as the "known point". Intersection of all three axes at the known point also satisfies, as does impliedly the Cielo device (see FIG. 2), the Scheimpflug condition for focusing images of a reflected light beam onto a surface such as that of the photo-detector array. For a description of the Scheimpflug condition see for example: Scheimpflug, T(1906), `Der Photoperspektograph und seine Anwendung`, Photographische Korrespondenz 43, 516; Brown, N(1969), `Slit Image Photography`, Trans. Ophthal. Soc., 89, 397; G. Bickel, G. Hausler, and M. Maul, "Triangulation with expanded range of depth", Opt. Eng. 24(6), 975-977 (1985).
The Scheimpflug condition is an approximation based on the assumption that the lens being used to focus the reflected image onto the photo-detector array surface may be modeled as a thin lens. That is, an assumption is made that the thickness of the lens element is small enough so that the effect of the lens thickness on the accuracy of the calculation of the known point may be neglected. For the purpose of such a thin lens approximation, the thickness of the lens is assumed to be zero. The principal points of the lens are thus assumed to be coincident. The principle plane of a thin lens is the plane which is normal to the optical axis of the lens and intersects the principal point which is on this same axis. The position of this plane at which it, the light beam axis and the longitudinal axis of the array intersect at a known point defines an orientation which satisfies the Scheimpflug condition. If it is assumed then, using the thin lens approximation, that the primary and secondary principal plane of the lens may be taken as coincident then that coincident plane or a chosen single reference plane, where it intersects the light beam axis and the longitudinal axis of the array locates the known point and satisfies the Scheimpflug condition.
Real lenses such as used in the present invention and such as are used in triangulation based electro-optical distance measuring devices of which the applicant is aware, have finite thicknesses and thus primary and secondary principal points, separated by known distances. For the purpose of comparing the characteristics of a real or thick lens with respect to the Scheimpflug condition, the terms primary and secondary planes have been used to define planes which are normal to the optical axis and intersect the primary and secondary principal points, respectively. If the geometry of such a device is aligned to form a known point and thus satisfy the Scheimpflug condition, for example, by having the secondary principal plane intersect the point of intersection of the light beam axis with the longitudinal axis of the detector array, then it is only an approximation to state, as does Nosler, that focus is maintained over what Nosler refers to as the dynamic range. Such an approximation ignores the higher order effects of a real lens.
The reliance by Cielo et al and Nosler on the concept of focus is an oversimplification. That is, it is not only the focus achieved by a geometric alignment satisfying the Scheimpflug condition, in applications of which the present invention is one, that govern the resolution accuracy of a photodetection array in a triangulation based distance measuring device. Instead of "focus" per se, it is array output signal optimization which is desirable in devices using real lenses and conventional non-wide aperture photo-detector arrays such as the EG&G Reticon.TM. array, model number RL1024DAG-020. Array output signal optimization means optimizing the signal to noise ratio from the array and optimizing the array resolution accuracy, i.e. the accuracy with which the centroid of a pulse may be located.
Concentrating solely on focus by strictly adhering to the Scheimpflug condition ignores other factors affecting array output signal optimization, vis:
(a) light beam intensity profile;
(b) saturation of pixel output;
(c) number of pixels covered by the light beam image;
(d) standoff distance;
(e) target range; and,
(f) laser power setting.
In what follows then, the "focus" position or known point refers to an alignment whereby the secondary principal lens plane intersects the intersection point of the light beam axis and the longitudinal axis of the photo-detector array. Alignments other than those satisfying the Scheimpflug condition are referred to as "de-focused". Thus, for example, translating the position of the lens along the lens axis so as to move the secondary principal plane off the known point is referred to as defocusing the lens.
It is an object of the present invention consequently to provide a method and apparatus for optimizing the alignment of the three principal components, namely, the light source, the lens, and the photo-detector array, and for optimizing the output signal from the photo-detector array across the target range of interest.